﻿using System.Runtime.InteropServices;
using Avalonia.Controls;

namespace AnimationPage.Views;

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        AddPseudoClasses();
    }

    private void AddPseudoClasses()
    {
        if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            PseudoClasses.Add(":windows");
        else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
            PseudoClasses.Add(":mac");
        else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
            PseudoClasses.Add(":linux");
        else
        {
            //其他平台自行判断
        }
    }
}